<html>
<head>
<title>Docs For Class PHPExcel_Shared_Excel5</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">PHPExcel_Shared</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
        
                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                      		  [ <a href="../classtrees_PHPExcel_Shared.html" class="menu">class tree: PHPExcel_Shared</a> ]
		  [ <a href="../elementindex_PHPExcel_Shared.html" class="menu">index: PHPExcel_Shared</a> ]
		  	    [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_PHPExcel.html">PHPExcel</a><br />
              <a href="../li_JAMA.html">JAMA</a><br />
              <a href="../li_Math_Stats.html">Math_Stats</a><br />
              <a href="../li_PHPExcel_CachedObjectStorage.html">PHPExcel_CachedObjectStorage</a><br />
              <a href="../li_PHPExcel_Calculation.html">PHPExcel_Calculation</a><br />
              <a href="../li_PHPExcel_Cell.html">PHPExcel_Cell</a><br />
              <a href="../li_PHPExcel_Chart.html">PHPExcel_Chart</a><br />
              <a href="../li_PHPExcel_Chart_Renderer.html">PHPExcel_Chart_Renderer</a><br />
              <a href="../li_PHPExcel_Reader.html">PHPExcel_Reader</a><br />
              <a href="../li_PHPExcel_Reader_Excel5.html">PHPExcel_Reader_Excel5</a><br />
              <a href="../li_PHPExcel_Reader_Excel2007.html">PHPExcel_Reader_Excel2007</a><br />
              <a href="../li_PHPExcel_RichText.html">PHPExcel_RichText</a><br />
              <a href="../li_PHPExcel_Settings.html">PHPExcel_Settings</a><br />
              <a href="../li_PHPExcel_Shared.html">PHPExcel_Shared</a><br />
              <a href="../li_PHPExcel_Shared_Escher.html">PHPExcel_Shared_Escher</a><br />
              <a href="../li_PHPExcel_Shared_OLE.html">PHPExcel_Shared_OLE</a><br />
              <a href="../li_PHPExcel_Shared_Trend.html">PHPExcel_Shared_Trend</a><br />
              <a href="../li_PHPExcel_Shared_ZipArchive.html">PHPExcel_Shared_ZipArchive</a><br />
              <a href="../li_PHPExcel_Style.html">PHPExcel_Style</a><br />
              <a href="../li_PHPExcel_Worksheet.html">PHPExcel_Worksheet</a><br />
              <a href="../li_PHPExcel_Worksheet_Drawing.html">PHPExcel_Worksheet_Drawing</a><br />
              <a href="../li_PHPExcel_Writer.html">PHPExcel_Writer</a><br />
              <a href="../li_PHPExcel_Writer_Excel5.html">PHPExcel_Writer_Excel5</a><br />
              <a href="../li_PHPExcel_Writer_Excel2007.html">PHPExcel_Writer_Excel2007</a><br />
            <br /><br />
                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---CodePage.php.html">		CodePage.php
		</a><br>
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---Date.php.html">		Date.php
		</a><br>
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---Drawing.php.html">		Drawing.php
		</a><br>
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---Excel5.php.html">		Excel5.php
		</a><br>
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---File.php.html">		File.php
		</a><br>
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---Font.php.html">		Font.php
		</a><br>
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---OLERead.php.html">		OLERead.php
		</a><br>
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---PasswordHasher.php.html">		PasswordHasher.php
		</a><br>
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---String.php.html">		String.php
		</a><br>
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---XMLWriter.php.html">		XMLWriter.php
		</a><br>
			<a href="../PHPExcel_Shared/_PHPExcel---Shared---ZipStreamWrapper.php.html">		ZipStreamWrapper.php
		</a><br>
	  </div><br />
      
      
            <b>Classes:</b><br />
        <div class="package">
		    		<a href="../PHPExcel_Shared/PHPExcel_Shared_CodePage.html">PHPExcel_Shared_CodePage</a><br />
	    		<a href="../PHPExcel_Shared/PHPExcel_Shared_Date.html">PHPExcel_Shared_Date</a><br />
	    		<a href="../PHPExcel_Shared/PHPExcel_Shared_Drawing.html">PHPExcel_Shared_Drawing</a><br />
	    		<a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html">PHPExcel_Shared_Excel5</a><br />
	    		<a href="../PHPExcel_Shared/PHPExcel_Shared_File.html">PHPExcel_Shared_File</a><br />
	    		<a href="../PHPExcel_Shared/PHPExcel_Shared_Font.html">PHPExcel_Shared_Font</a><br />
	    		<a href="../PHPExcel_Shared/PHPExcel_Shared_OLERead.html">PHPExcel_Shared_OLERead</a><br />
	    		<a href="../PHPExcel_Shared/PHPExcel_Shared_PasswordHasher.html">PHPExcel_Shared_PasswordHasher</a><br />
	    		<a href="../PHPExcel_Shared/PHPExcel_Shared_String.html">PHPExcel_Shared_String</a><br />
	    		<a href="../PHPExcel_Shared/PHPExcel_Shared_XMLWriter.html">PHPExcel_Shared_XMLWriter</a><br />
	    		<a href="../PHPExcel_Shared/PHPExcel_Shared_ZipStreamWrapper.html">PHPExcel_Shared_ZipStreamWrapper</a><br />
	  </div>
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: PHPExcel_Shared_Excel5</h1>
Source Location: /PHPExcel/Shared/Excel5.php<br /><br />


<table width="100%" border="0">
<tr><td valign="top">

<h3><a href="#class_details">Class Overview</a></h3>
<pre></pre><br />
<div class="description">PHPExcel_Shared_Excel5</div><br /><br />
<h4>Author(s):</h4>
<ul>
        </ul>




      
  

<h4>Copyright:</h4>
<ul>
  <li>Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)</li>
</ul>
        
</td>



<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html#methodgetDistanceX">getDistanceX</a></li>
    <li><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html#methodgetDistanceY">getDistanceY</a></li>
    <li><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html#methodoneAnchor2twoAnchor">oneAnchor2twoAnchor</a></li>
    <li><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html#methodsizeCol">sizeCol</a></li>
    <li><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html#methodsizeRow">sizeRow</a></li>
  </ul>
</td>

</tr></table>
<hr />

<table width="100%" border="0"><tr>






</tr></table>
<hr />

<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line 35]<br />
PHPExcel_Shared_Excel5<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>copyright:</b>&nbsp;&nbsp;</td><td>Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)</td>
  </tr>
</table>
</div>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />


<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">
  <hr />
	<a name="methodgetDistanceX"></a>
	<h3>static method getDistanceX <span class="smalllinenumber">[line 144]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>static integer getDistanceX(
PHPExcel_Worksheet
$sheet, [string
$startColumn = 'A'], [
$startOffsetX = 0], [string
$endColumn = 'A'], [
$endOffsetX = 0], integer
$startOffset, integer
$endOffset)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Get the horizontal distance in pixels between two anchors  The distanceX is found as sum of all the spanning columns widths minus correction for the two offsets<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Horizontal measured in pixels</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type"><a href="../PHPExcel_Worksheet/PHPExcel_Worksheet.html">PHPExcel_Worksheet</a>&nbsp;&nbsp;</td>
        <td><b>$sheet</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$startColumn</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">integer&nbsp;&nbsp;</td>
        <td><b>$startOffset</b>&nbsp;&nbsp;</td>
        <td>Offset within start cell measured in 1/1024 of the cell width</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$endColumn</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">integer&nbsp;&nbsp;</td>
        <td><b>$endOffset</b>&nbsp;&nbsp;</td>
        <td>Offset within end cell measured in 1/1024 of the cell width</td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$startOffsetX</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$endOffsetX</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodgetDistanceY"></a>
	<h3>static method getDistanceY <span class="smalllinenumber">[line 175]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>static integer getDistanceY(
PHPExcel_Worksheet
$sheet, [string
$startRow = 1], [
$startOffsetY = 0], [string
$endRow = 1], [
$endOffsetY = 0], integer
$startOffset, integer
$endOffset)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Get the vertical distance in pixels between two anchors  The distanceY is found as sum of all the spanning rows minus two offsets<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Vertical distance measured in pixels</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type"><a href="../PHPExcel_Worksheet/PHPExcel_Worksheet.html">PHPExcel_Worksheet</a>&nbsp;&nbsp;</td>
        <td><b>$sheet</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$startRow</b>&nbsp;&nbsp;</td>
        <td>(1-based)</td>
      </tr>
          <tr>
        <td class="type">integer&nbsp;&nbsp;</td>
        <td><b>$startOffset</b>&nbsp;&nbsp;</td>
        <td>Offset within start cell measured in 1/256 of the cell height</td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$endRow</b>&nbsp;&nbsp;</td>
        <td>(1-based)</td>
      </tr>
          <tr>
        <td class="type">integer&nbsp;&nbsp;</td>
        <td><b>$endOffset</b>&nbsp;&nbsp;</td>
        <td>Offset within end cell measured in 1/256 of the cell height</td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$startOffsetY</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$endOffsetY</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodoneAnchor2twoAnchor"></a>
	<h3>static method oneAnchor2twoAnchor <span class="smalllinenumber">[line 245]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>static array oneAnchor2twoAnchor(
<a href="../PHPExcel_Worksheet/PHPExcel_Worksheet.html">PHPExcel_Worksheet</a>
$sheet, string
$coordinates, integer
$offsetX, integer
$offsetY, integer
$width, integer
$height)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Convert 1-cell anchor coordinates to 2-cell anchor coordinates  This function is ported from PEAR Spreadsheet_Writer_Excel with small modifications<br /><br /><p>Calculate the vertices that define the position of the image as required by  the OBJ record.</p><p>+------------+------------+ 		 |	 A	  |	  B	 |    +-----+------------+------------+    |	 |(x1,y1)	 |			|    |  1  |(A1)._______|______	  |    |	 |	|			  |	 |    |	 |	|			  |	 |    +-----+----|	BITMAP	|-----+    |	 |	|			  |	 |    |  2  |	|______________.	 |    |	 |			|		(B2)|    |	 |			|	 (x2,y2)|    +---- +------------+------------+</p><p>Example of a bitmap that covers some of the area from cell A1 to cell B2.</p><p>Based on the width and height of the bitmap we need to calculate 8 vars: 	 $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2.  The width and height of the cells are also variable and have to be taken into  account.  The values of $col_start and $row_start are passed in from the calling  function. The values of $col_end and $row_end are calculated by subtracting  the width and height of the bitmap from the width and height of the  underlying cells.  The vertices are expressed as a percentage of the underlying cell width as  follows (rhs values are in pixels):</p><p>x1 = X / W *1024 	   y1 = Y / H *256 	   x2 = (X-1) / W *1024 	   y2 = (Y-1) / H *256</p><p>Where:  X is distance from the left side of the underlying cell 			   Y is distance from the top of the underlying cell 			   W is the width of the cell 			   H is the height of the cell</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type"><a href="../PHPExcel_Worksheet/PHPExcel_Worksheet.html">PHPExcel_Worksheet</a>&nbsp;&nbsp;</td>
        <td><b>$sheet</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$coordinates</b>&nbsp;&nbsp;</td>
        <td>E.g. 'A1'</td>
      </tr>
          <tr>
        <td class="type">integer&nbsp;&nbsp;</td>
        <td><b>$offsetX</b>&nbsp;&nbsp;</td>
        <td>Horizontal offset in pixels</td>
      </tr>
          <tr>
        <td class="type">integer&nbsp;&nbsp;</td>
        <td><b>$offsetY</b>&nbsp;&nbsp;</td>
        <td>Vertical offset in pixels</td>
      </tr>
          <tr>
        <td class="type">integer&nbsp;&nbsp;</td>
        <td><b>$width</b>&nbsp;&nbsp;</td>
        <td>Width in pixels</td>
      </tr>
          <tr>
        <td class="type">integer&nbsp;&nbsp;</td>
        <td><b>$height</b>&nbsp;&nbsp;</td>
        <td>Height in pixels</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodsizeCol"></a>
	<h3>static method sizeCol <span class="smalllinenumber">[line 46]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>static integer sizeCol(
<a href="../PHPExcel_Worksheet/PHPExcel_Worksheet.html">PHPExcel_Worksheet</a>
$sheet, [integer
$col = 'A'])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Get the width of a column in pixels. We use the relationship y = ceil(7x) where  x is the width in intrinsic Excel units (measuring width in number of normal characters)  This holds for Arial 10<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>The width in pixels</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type"><a href="../PHPExcel_Worksheet/PHPExcel_Worksheet.html">PHPExcel_Worksheet</a>&nbsp;&nbsp;</td>
        <td><b>$sheet</b>&nbsp;&nbsp;</td>
        <td>The sheet</td>
      </tr>
          <tr>
        <td class="type">integer&nbsp;&nbsp;</td>
        <td><b>$col</b>&nbsp;&nbsp;</td>
        <td>The column</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodsizeRow"></a>
	<h3>static method sizeRow <span class="smalllinenumber">[line 93]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>static integer sizeRow(
<a href="../PHPExcel_Worksheet/PHPExcel_Worksheet.html">PHPExcel_Worksheet</a>
$sheet, [integer
$row = 1])</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Convert the height of a cell from user's units to pixels. By interpolation  the relationship is: y = 4/3x. If the height hasn't been set by the user we  use the default value. If the row is hidden we use a value of zero.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>The width in pixels</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type"><a href="../PHPExcel_Worksheet/PHPExcel_Worksheet.html">PHPExcel_Worksheet</a>&nbsp;&nbsp;</td>
        <td><b>$sheet</b>&nbsp;&nbsp;</td>
        <td>The sheet</td>
      </tr>
          <tr>
        <td class="type">integer&nbsp;&nbsp;</td>
        <td><b>$row</b>&nbsp;&nbsp;</td>
        <td>The row index (1-based)</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>

</div><br />


        <div class="credit">
		    <hr />
		    Documentation generated on Fri, 12 Oct 2012 00:16:12 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.4</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>